//
//  LSREssenceViewController.m
//  BaiSiProject
//
//  Created by lshenrong on 16/7/3.
//  Copyright © 2016年 lshenrong. All rights reserved.
//

#import "LSREssenceViewController.h"
#import "LSRAllViewController.h"
#import "LSRVideoViewController.h"
#import "LSRVoiceViewController.h"
#import "LSRPictureiewController.h"
#import "LSRTextViewController.h"



@interface LSREssenceViewController ()

@end

@implementation LSREssenceViewController
-(void)viewDidLoad
{
    [super viewDidLoad];
    //设置所有子控制器
    [self setUpTopChildControllers];
    [self setNavigationBar];

}


#pragma mark --setUpTopChildControllers

-(void)setUpTopChildControllers
{
    /*#import "LSRAllViewController.h"
     #import "LSRVideoViewController.h"
     #import "LSRVoiceViewController.h"
     #import "LSRPictureiewController.h"
     #import "LSRTextViewController.h"
     */
    //添加all控制器
    LSRAllViewController *VC0=[[LSRAllViewController alloc] init];
    [self addChildViewController:VC0];
    VC0.title=@"全部";
    //添加all控制器
    LSRVideoViewController *VC1=[[LSRVideoViewController alloc] init];
    [self addChildViewController:VC1];
    VC1.title=@"视频";
    //添加all控制器
    LSRVoiceViewController *VC2=[[LSRVoiceViewController alloc] init];
    [self addChildViewController:VC2];
    VC2.title=@"声音";
    //添加all控制器
    LSRPictureiewController *VC3=[[LSRPictureiewController alloc] init];
    [self addChildViewController:VC3];
    VC3.title=@"图片";
    //添加all控制器
    LSRTextViewController *VC4=[[LSRTextViewController alloc] init];
    [self addChildViewController:VC4];
    VC4.title=@"段子";
    
}
#pragma mark--setNavigationBar
-(void)setNavigationBar
{
    
    
    //设置中间的titleView
    UIImageView *imageView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"MainTitle"]];
    self.navigationItem.titleView=imageView;
    
    self.navigationItem.leftBarButtonItem=[UIBarButtonItem itemWithimage:[UIImage imageNamed:@"nav_item_game_icon"]  highlightImage:[UIImage imageNamed:@"nav_item_game_click_icon"]  Target:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside ];
    //设置右边item
    self.navigationItem.rightBarButtonItem=[UIBarButtonItem itemWithimage:[UIImage imageNamed:@"navigationButtonRandom"] highlightImage:[UIImage imageNamed:@"navigationButtonRandomClickN"]  Target:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    
}


-(void)btnClick
{
    NSLog(@"%s",__func__);
    
    
    
}


@end
